Public Class FunctionsPublic

    Shared Function GetKey(ByVal strKey As String) As String

        If strKey <> "" Then
            Return ConfigurationManager.AppSettings.Item(strKey)
        Else
            Return Nothing
        End If
    End Function

    Shared Function SqlReplaceText(ByVal strSql As String) As String
        Dim strFixedSQL As String

        strFixedSQL = strSql
        'strFixedSQL = Replace(strFixedSQL, "'", "")
        strFixedSQL = Replace(strFixedSQL, "[", "")
        strFixedSQL = Replace(strFixedSQL, "%", "")
        'strFixedSQL = Replace(strFixedSQL, "_", "[_]") 
        'some people may have underscores in their email address
        strFixedSQL = Replace(strFixedSQL, "--", "")
        strFixedSQL = Trim(strFixedSQL)

        If strFixedSQL = "" Then
            strFixedSQL = " "
        End If
        'return the fixed sql
        SqlReplaceText = strFixedSQL
    End Function
End Class
